const mongoose = require('mongoose')               //载入mongoose模块
const config=require('../config')                  //配置信息

var url ='mongodb://localhost:27017/text'         // 数据库地址端口号/数据库名    
mongoose.connect(url)
db = mongoose.connection;
db.once('open', function callback () {
  console.log('链接成功了')
});	

module.exports = db
